import http from "@/utils/http"

export default {
  prefixUrl: "/systemArea",
  role: {
    query: "GET:/systemArea",
    create: "POST:/systemArea",
    sort: "PUT:/systemArea",
    select: "GET:/systemArea/:id",
    update: "PUT:/systemArea/:id",
    delete: "DELETE:/systemArea/:id",
  },
  query(params) {
    return http.get(this.prefixUrl, params)
  },
  create(params) {
    return http.post(this.prefixUrl, params)
  },
  sort(params) {
    return http.put(this.prefixUrl, params)
  },
  select(id) {
    return http.get(this.prefixUrl + "/" + id)
  },
  update(id, params) {
    return http.put(this.prefixUrl + "/" + id, params)
  },
  delete(id) {
    return http.delete(this.prefixUrl + "/" + id)
  },
}
